home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Fun, Tricks & Hacks / VirtualControllers / Rotation Programs Doc < prev   
Text File  |  1989-09-22  |  11KB  |  88 lines

  1. Documentation for "Rotation Controllers" and "Rotation Experiment"
  2.  
  3.  
  4. 0. System Requirement
  5.  
  6.                The applications "Rotation Controllers" and "Rotation Experiment" will run on any configuration of Mac II, IIx, IIcx or IIci.  "Rotation Controllers" will also run on the SE/30 though screen space will be a bit little cramped.  Set the monitor (from the Control Panel) to display the maximum number of colors.  People with grey-scale monitors should try out both the "colors" and "grays" settings in the Control Panel.  For people with black and white monitors (SE/30), only the cube object will look acceptable in flat-shading.  Choose wireframe mode for the other objects.   Both applications use the math co-processor and Color QuickDraw.  They will not work on the Mac Plus, SE or Portable (yet).
  7.  
  8.  
  9. 1. Introduction
  10.  
  11.                The applications demonstrate five "virtual controllers" for use in rotating three-dimensional (3D) objects with the mouse.  The virtual controllers are described in more detail in the paper "A Study in Interactive 3-D Rotation Using 2-D Control Devices" by Michael Chen, S. Joy Mountford and Abigail Sellen published in the ACM Siggraph '88 proceedings (Volume 22, Number 4, August 1988).  The application "Rotation Controllers" allows you to compare the five controllers at the same time.  The application "Rotation Experiment" implements a version of the rotation experiment described in the Siggraph paper.
  12.  
  13.  
  14. 2. Description of Virtual Rotational Controllers
  15.  
  16.                Rotations are done with respect to the screen's (camera's) frame of reference, with the x-axis pointing to the right, y-axis pointing upward and z-axis pointing at the user.  So, rotations in x, y and z correspond to rotating the object up-and-down, left-and-right and clockwise-counter-clockwise, respectively.
  17.  
  18. 2.1. Graphical Sliders Controller
  19.  
  20.                The Graphical Sliders controller uses a traditional approach to allow the user to perform 3-D rotations.  The sliders simulate "treadmills" and therefore provide relative control over the amount of rotation.  A full sweep across a slider provides 180 degrees of rotation about an independent axis.  As long as the mouse button is initially depressed inside one slider, the user can rotate about the corresponding axis even if accidentally crossing into another slider.
  21.  
  22. 2.2. Overlapping Sliders Controller
  23.  
  24.                The Overlapping Sliders controller is a modification of the conventional slider approach.  The three squares in the middle column of the 9-square grid represent a vertical (x) slider.  The three squares in the middle row represent a horizontal (y) slider.  The outside eight squares represent a circular (z) slider.
  25.  
  26.                A full sweep of the vertical or horizontal slider rotates the object 180 degrees about the x or y axis respectively.  A full circle around the outside squares rotates the object 360 degrees about z.  Note that only near vertical, horizontal and circular movement of the mouse inside the middle column, middle row and outside squares (respectively) are recognized by this controller.  A diagonal movement in the middle square, for example, is ignored since this would be a coupled rotation in x and y (i.e. the rotation axis lying somewhere on the x-y plane).  Thus, this controller still operates on the basis of single axis control.  The difference between this controller and conventional sliders, though, is increased controller-display compatibility.  The direction of movement of the mouse more closely corresponds with the direction of rotation.  In addition, superimposing the controller on the object is intended to give the user more of a sense of directly manipulating the object.
  27.  
  28. 2.3. Continuous XY with Additional Z Controller
  29.  
  30.                The Continuous XY with added Z controller operates in two modes.  If the mouse button is depressed while the mouse cursor is inside the circle, left-and-right and up-and-down movement of the mouse will rotate the object left-and right and up-and-down on the screen.  Diagonal movement will rotate the object the proportional amount about the x and y-axis ( i.e. the axis of rotation is on the x-y plane and is perpendicular to the direction of mouse movement).  If the mouse button is depressed while the mouse cursor is outside the circle, the user can rotate the whole object clockwise by going around the outside of the circle.  Thus this controller provides either 1) continuous rotation on the x-y plane, or 2) exact rotation about the z-axis.  A full sweep of the mouse across the circle rotates the object 180 degrees about the corresponding axis in the x-y plane.  A full circle around the outside rotates the object 360 degrees about z.
  31.  
  32. 2.4. Virtual Sphere Controller
  33.  
  34.                The virtual sphere controller simulates the mechanics of a physical 3-D trackball that can freely rotate about any arbitrary axis in 3-space.  On the display screen, the user can imagine viewing an object encased in a glass sphere.  Rotation is then a matter of rolling the sphere and therefore the object with the mouse cursor.  Up-and-down and left-and-right movement at the centre of the circle is equivalent to "rolling" the imaginary sphere at its apex and produces rotation about the x and y-axis respectively.  Movement along (or completely outside) the edge of the circle is equivalent to rolling the sphere at the edge and produces rotation about z.  The amount of rotation is adjusted so that a full sweep of the mouse across the circle rotates the object 180 degrees about the corresponding axis in the x-y plane; a full circle around the outside rotates the object 360 degrees about z.    Thus arbitrary movement will produce the proportionate amount of rotation in x, y and z one would expect if one is spinning a real ball.  Note: if you do not need the full 3 degrees of freedom, holding down the shift key will constrain the rotation to the x, y or z-axis.
  35.  
  36.                The difference between this and the Continuous XY with additional Z is that the Virtual Sphere allows continuous rotation about ALL THREE axes inside the circle while the latter only allows continuous control of two axes inside.  To rotate in z, the user must go outside the circle.
  37.                
  38. 2.5  Evans, Tanner & Wein Controller
  39.  
  40.                The Evans et al. technique is a combination of the "two-axis trackball" and the "stirrer" techniques they described in their paper [ACM Siggraph '81 Proceedings, Vol. 15, #3, Aug 81].  Their implementation recognizes straight line (continuous rotation in x and y) and circular (rotation in z) gestures.  To detect the different motions, a "stirring angle" is calculated based on the change in movement of the last three positions of the input device.  This value is then compared to a threshold to decide whether the movement is in a "relatively" straight-line or not.  The threshold, unfortunately, is dependent on two interrelated variables: the speed with which each individual user likes to draw the circle and the frequency of reading of the input device.  If the sampling rate is too fast or the user prefers to draw the circle slowly, the three readings would tend to indicate that a straight line is drawn.  Thus, threshold adjustments may be needed for different systems and different users with this technique.  This application contains a dialog box that allows the threshold parameters to be adjusted (see below).
  41.  
  42.  
  43. 3. Using the "Rotation Controllers" application.
  44.  
  45.                This application starts up with the five virtual controllers displayed in separate windows.  Each window can display one of four objects: a cube, an icosahedron, a house and a Mac II.  Change the object by using the "Objects" menu.
  46.  
  47.                The "Options" menu lets you toggle between wireframe / flat-shading, and enabling / disabling backfaced polygon removal and double buffering.
  48.  
  49.                The "Controller" menu lets you zoom out a particular virtual controller window to full screen, re-tile all the windows to their default locations, and change the parameters for the Evans, Tanner & Wein controller (see the Siggraph paper for more detail).
  50.  
  51.                The parameters that can be changed in the Evans, Tanner & Wein Controller Setup dialog are:
  52.  
  53.                        "Pixel movement threshold": the amount of mouse movement before it is considered a real movement
  54.                                   for the controller.
  55.                        "Stirring angle threshold:" the minimum stirring angle before rotation is switched form x-y to z.
  56.                        "X-Y rotation scaling:" the scaling factor used if in x-y rotation mode.
  57.                        "Z rotation scaling:" the scaling factor used if in z rotation mode.
  58.                        "Maximum Z rotation:" the maximum amount of z rotation per display cycle.
  59.  
  60.                The default values in the dialog box are my values for the house object on a Mac II in single Finder.   I am sure they are not optimal.  If you are going to use the companion rotation experiment application, you might want to tune the E, T & W parameters here and enter them in the experiment application.
  61.  
  62.  
  63. 4. Using the "Rotation Experiment" application 
  64.  
  65.                This application is an almost exact copy of the experiment used for collecting the data reported in the Siggraph paper.  Since the original version ran on a Silicon Graphics IRIS 3010, some modifications had to be made on this Mac version.  This version tests all five controllers one after the other.
  66.  
  67.                In the Experiment Setup dialog box, you will need to specify the order of the controllers to be tested.  Since this is an within subject experiment, the order of the controllers will affect the subject's performance.  In the Siggraph experiment, we varied the controller order using a Latin Square design.
  68.  
  69.                In the Evans, Tanner and Wein Controller Setup dialog, you will need to specify the five parameters discussed in the last section.  The default values I have chosen works reasonably well on a Mac II, I am sure they are not optimal.  My apologies.  Let me know if you come up with a better set of values.
  70.  
  71.                After all the dialogs, read the instructions in the instructions window to begin the experiment.  Note all windows are deactivated during the experiment excepted for the "Rotation Window".  To interrupt the experiment at any time, choose "End Experiment" from the File menu.  You can then activate the "Experiment Results" window and copy any experimental data onto the Clipboard before you quit the program.
  72.  
  73.  
  74. 5. Where am I?
  75.  
  76. Comments are welcomed.  I can be reached by:
  77.                internet:         chen@apple.com
  78.                AppleLink:       CHEN.M
  79.                mail:               20525 Mariani Ave, MS 76-3H
  80.                                       Cupertino, CA 95014
  81.  
  82. Sept 1989
  83.  
  84. P.S.  Both programs are copyrighted but may be distributed freely.  If you like the 2 programs, why not make a $5 donation to your favorite charity.
  85.  
  86. Michael Chen
  87. ATG / Human Interface Group, Apple Computer, Inc.
  88.